<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.4.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"example.com","root":"/","scheme":"Pisces","version":"7.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":true},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":false,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}}};
  </script>

  <meta name="description" content="此篇为学习强化学习的个人笔记，对应书籍Reinforcement Learning An Introduction，第二章Multi-armed Bandits.">
<meta property="og:type" content="article">
<meta property="og:title" content="2-多臂机">
<meta property="og:url" content="http://example.com/2021/10/19/%E5%BC%BA%E5%8C%96%E5%AD%A6%E4%B9%A0/2-%E5%A4%9A%E8%87%82%E6%9C%BA/index.html">
<meta property="og:site_name" content="祖浩の博客">
<meta property="og:description" content="此篇为学习强化学习的个人笔记，对应书籍Reinforcement Learning An Introduction，第二章Multi-armed Bandits.">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="http://example.com/2021/10/19/%E5%BC%BA%E5%8C%96%E5%AD%A6%E4%B9%A0/2-%E5%A4%9A%E8%87%82%E6%9C%BA/image-20211023125819074.png">
<meta property="article:published_time" content="2021-10-19T08:09:17.000Z">
<meta property="article:modified_time" content="2021-10-30T12:32:37.509Z">
<meta property="article:author" content="谢祖浩">
<meta property="article:tag" content="强化学习">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="http://example.com/2021/10/19/%E5%BC%BA%E5%8C%96%E5%AD%A6%E4%B9%A0/2-%E5%A4%9A%E8%87%82%E6%9C%BA/image-20211023125819074.png">

<link rel="canonical" href="http://example.com/2021/10/19/%E5%BC%BA%E5%8C%96%E5%AD%A6%E4%B9%A0/2-%E5%A4%9A%E8%87%82%E6%9C%BA/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>2-多臂机 | 祖浩の博客</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">祖浩の博客</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签</a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a>

  </li>
  </ul>
</nav>




</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="http://example.com/2021/10/19/%E5%BC%BA%E5%8C%96%E5%AD%A6%E4%B9%A0/2-%E5%A4%9A%E8%87%82%E6%9C%BA/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/head.jpeg">
      <meta itemprop="name" content="谢祖浩">
      <meta itemprop="description" content="驽马十驾，功在不舍">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="祖浩の博客">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          2-多臂机
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2021-10-19 16:09:17" itemprop="dateCreated datePublished" datetime="2021-10-19T16:09:17+08:00">2021-10-19</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="far fa-calendar-check"></i>
                </span>
                <span class="post-meta-item-text">更新于</span>
                <time title="修改时间：2021-10-30 20:32:37" itemprop="dateModified" datetime="2021-10-30T20:32:37+08:00">2021-10-30</time>
              </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/%E5%BC%BA%E5%8C%96%E5%AD%A6%E4%B9%A0/" itemprop="url" rel="index"><span itemprop="name">强化学习</span></a>
                </span>
            </span>

          
            <div class="post-description">此篇为学习强化学习的个人笔记，对应书籍Reinforcement Learning An Introduction，第二章Multi-armed Bandits.</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <h1 id="基本概念">基本概念</h1>
<p><font face="仿宋"><strong>评价性反馈</strong></font>（<span class="math inline">\(evaluative~feedback\)</span>​​）：采取不同动作获得不同反馈。</p>
<p><font face="仿宋"><strong>指导性反馈</strong></font>（<span class="math inline">\(instructive~feedback\)</span>）：采取不同动作获得相同反馈。</p>
<p>在<span class="math inline">\(k\)</span>​臂赌博机问题中</p>
<p><font face="仿宋"><strong>价值</strong></font>（<span class="math inline">\(value\)</span>）：动作被选择时的期望或平均收益。</p>
<p><span class="math inline">\(A_t\)</span>： <span class="math inline">\(t\)</span> 时刻选职责的动作</p>
<p><span class="math inline">\(R_t\)</span>​： <span class="math inline">\(A_t\)</span>​​ 动作对应的<strong>收益</strong>（<span class="math inline">\(reward\)</span>）</p>
<p><span class="math inline">\(q_*(a)\)</span>​： 任一动作 <span class="math inline">\(a\)</span>​ 对应的<strong>价值</strong></p>
<p><span class="math inline">\(Q_t(a)\)</span>：价值的估计</p>
<p>价值（<span class="math inline">\(value\)</span>）与收益（<span class="math inline">\(reward\)</span>​）的关系： <span class="math display">\[
q_{*}(a) \doteq \mathbb{E}\left[R_{t} \mid A_{t}=a\right]
\]</span> <font color=red><strong>价值是收益的期望。</strong></font></p>
<p><font face="仿宋"><strong>开发</strong></font>：选择贪心动作。</p>
<p><font face="仿宋"><strong>试探</strong></font>：选择非贪心动作。</p>
<h1 id="动作-价值方法-action-valuemethods">动作-价值方法 <span class="math inline">\(Action-value~Methods\)</span></h1>
<h2 id="对某动作对应价值的估算">对某动作对应价值的估算</h2>
<p>简介：动作价值的真值是收益的期望，可以通过计算实际收益的平均值来估计价值。</p>
<p>计算公式：<font face="仿宋"><strong>采样平均方法</strong></font></p>
<p><span class="math display">\[
Q_{t}(a) \doteq \frac{t \text{时刻前执行动作}a\text{所得收益总和}}{t \text{时刻前 执行动作}a \text{次数}}=\frac{\sum_{i=1}^{t-1} R_{i} \cdot \mathbb{1}_{A_{i}=a}}{\sum_{i=1}^{t-1} \mathbb{1}_{A_{i}=a}}
\]</span></p>
<p>其中，<span class="math inline">\(\mathbb{1}_{A_{i}=a}\)</span>是随机变量，当<span class="math inline">\(A_i = a\)</span>时为1，其余时间为0。定义分母为0时，<span class="math inline">\(Q_t(a) =0\)</span>.</p>
<h2 id="根据估计值选择动作">根据估计值选择动作</h2>
<ol type="1">
<li>贪心动作选择方法：</li>
</ol>
<p><span class="math display">\[
A_{t} \doteq \underset{a}{\arg \max } Q_{t}(a)
\]</span></p>
<p>等式右边表示，使得<span class="math inline">\(Q_t(a)\)</span>值最大时，<span class="math inline">\(a\)</span>的值.</p>
<ol start="2" type="1">
<li><span class="math inline">\(\epsilon\)</span>-贪心方法</li>
</ol>
<p>在选择动作时，以<span class="math inline">\(\epsilon\)</span>​的概率不使用贪心方法，而在所有动作中等概率做出选择。</p>
<p>相对于贪心方法，这个方法更适合于假设收益的方差大的例子。方差大后，动作对应的收益不确定性大，随机选择的效果可能会更好。如果方差为0，表示已知所有动作对应的价值，贪心算法当然更好。</p>
<h1 id="增量计算">增量计算</h1>
<p>因为每次计算，都是相对于上一次的变化，所以没必要从头再算，可以使用增量计算，简化符号如下：</p>
<p><span class="math inline">\(R_i\)</span>：动作 <span class="math inline">\(a\)</span> 被选择 <span class="math inline">\(i\)</span>​ 次后的获得的收益</p>
<p><span class="math inline">\(Q_n\)</span>：动作<span class="math inline">\(a\)</span>被选择<font color=red><span class="math inline">\(n-1\)</span></font>次后其估计的动作价值。有 <span class="math display">\[
Q_{n} \doteq \frac{R_{1}+R_{2}+\cdots+R_{n-1}}{n-1}
\]</span> 增量化公式推到如下： <span class="math display">\[
\begin{aligned}
Q_{n+1} &amp;=\frac{1}{n} \sum_{i=1}^{n} R_{i} \\
&amp;=\frac{1}{n}\left(R_{n}+\sum_{i=1}^{n-1} R_{i}\right) \\
&amp;=\frac{1}{n}\left(R_{n}+(n-1) \frac{1}{n-1} \sum_{i=1}^{n-1} R_{i}\right) \\
&amp;=\frac{1}{n}\left(R_{n}+(n-1) Q_{n}\right) \\
&amp;=\frac{1}{n}\left(R_{n}+n Q_{n}-Q_{n}\right) \\
&amp;=Q_{n}+\frac{1}{n}\left[R_{n}-Q_{n}\right],
\end{aligned}
\]</span> 这个更新公式非常重要，其基本形式为： <span class="math display">\[
\text{新估计值} \leftarrow \text{旧估计值} +\text{步长}\times \left[\text{目标}-\text{旧估计值}  \right]
\]</span> 其中<span class="math inline">\(\left[\text{目标}-\text{旧估计值} \right]\)</span> 为目标(<span class="math inline">\(Target\)</span>)。步长(<span class="math inline">\(stepsize\)</span>)的一般表示符号为<span class="math inline">\(\alpha\)</span>或<span class="math inline">\(\alpha_t(a)\)</span>，对应这里的增量公式为<span class="math inline">\(\frac{1}{n}\)</span>。</p>
<p>Pseudocode for a complete bandit algorithm using incrementally computed sample averages and ε-greedy action selection</p>
<p><img src="image-20211023125819074.png" alt="image-20211023125819074" style="zoom: 40%;" /></p>
<p>The function bandit(a) is assumed to take an action and return a corresponding reward.</p>
<h1 id="非平稳问题">非平稳问题</h1>
<p><strong>平稳问题</strong>：收益概率不随时间变化</p>
<p><strong>非平稳问题</strong>：收益概率随时间变化。处理这个问题，最流行的办法是使用<strong>固定步长</strong>，上面的更新公式可改为： <span class="math display">\[
Q_{n+1} \doteq Q_{n}+\alpha\left[R_{n}-Q_{n}\right]
\]</span> 其中<span class="math inline">\(\alpha \in (0,1]\)</span>为常数，<font color=red><strong>使用固定步长会使得价值的估计<span class="math inline">\(Q_{n+1}\)</span>变为初始价值估计<span class="math inline">\(Q_1\)</span>​和收益的加权平均值。</strong></font>证明： <span class="math display">\[
\begin{aligned}
Q_{n+1} &amp;=Q_{n}+\alpha\left[R_{n}-Q_{n}\right] \\
&amp;=\alpha R_{n}+(1-\alpha) Q_{n} \\
&amp;=\alpha R_{n}+(1-\alpha)\left[\alpha R_{n-1}+(1-\alpha) Q_{n-1}\right] \\
&amp;=\alpha R_{n}+(1-\alpha) \alpha R_{n-1}+(1-\alpha)^{2} Q_{n-1} \\
&amp;=\alpha R_{n}+(1-\alpha) \alpha R_{n-1}+(1-\alpha)^{2} \alpha R_{n-2}+\\
&amp; \quad \cdots+(1-\alpha)^{n-1} \alpha R_{1}+(1-\alpha)^{n} Q_{1} \\
&amp;=(1-\alpha)^{n} Q_{1}+\sum_{i=1}^{n} \alpha(1-\alpha)^{n-i} R_{i}
\end{aligned}
\]</span></p>
<ul>
<li><p>可以证明：<span class="math inline">\((1-\alpha)^{n} +\sum_{i=1}^{n} \alpha(1-\alpha)^{n-i}=1\)</span></p></li>
<li><p>赋给<span class="math inline">\(R_i\)</span>的权值会随时间变化，因为<span class="math inline">\(1-\alpha&lt;1\)</span>​，时间越向后，权重越低</p></li>
<li><p>此方法也被称为指数近因加权平均（<span class="math inline">\(exponential~recency-weighted~average\)</span>）</p></li>
</ul>
<h1 id="梯度赌博机算法">梯度赌博机算法</h1>
<h2 id="偏好函数">偏好函数</h2>
<p>对于每个动作<span class="math inline">\(a\)</span>考虑一个偏好函数<span class="math inline">\(H(a)\)</span>​，偏好函数越大，动作被执行的概率越高。下面展示一个由<span class="math inline">\(softmax\)</span>分布确定的动作概率： <span class="math display">\[
\operatorname{Pr}\left\{A_{t}=a\right\} \doteq \frac{e^{H_{t}(a)}}{\sum_{b=1}^{k} e^{H_{t}(b)}} \doteq \pi_{t}(a)
\]</span> 这个公式给出了每个动作被执行的概率，分子是某动作“权重”，分母是所有动作的”权重“，因为要服从<span class="math inline">\(softmax\)</span>分布，所以使用了指数函数的形式。其中引入了一个非常重要的定义：<span class="math inline">\(\pi_t(a)\)</span>，其表示在时刻<span class="math inline">\(t\)</span>执行动作<span class="math inline">\(a\)</span>的概率。</p>
<h2 id="更新策略">更新策略</h2>
<p>由梯度上升思想，给出如下的更新策略： <span class="math display">\[
\begin{aligned}
H_{t+1}\left(A_{t}\right) &amp; \doteq H_{t}\left(A_{t}\right)+\alpha\left(R_{t}-\bar{R}_{t}\right)\left(1-\pi_{t}\left(A_{t}\right)\right), &amp; &amp; \text { and } \\
H_{t+1}(a) &amp; \doteq H_{t}(a)-\alpha\left(R_{t}-\bar{R}_{t}\right) \pi_{t}(a), &amp; &amp; \text { for all } a \neq A_{t}
\end{aligned}
\]</span> <span class="math inline">\(\alpha\)</span>​ 为步长，<span class="math inline">\(\bar{R}_{t}\)</span>​为<strong>收益基准项</strong>，通常用时刻<span class="math inline">\(t\)</span>​内所有收益的平均值。这样，当收益高于<span class="math inline">\(\bar{R}_{t}\)</span>​时，未来选择<span class="math inline">\(A_{t}\)</span>​的概率会增加，反之亦然。</p>

    </div>

    
    
    

      <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/%E5%BC%BA%E5%8C%96%E5%AD%A6%E4%B9%A0/" rel="tag"># 强化学习</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/2021/09/13/%E7%8A%B6%E6%80%81%E5%8F%8D%E9%A6%88%E6%80%9D%E8%80%83%E4%B8%8E%E4%BB%BF%E7%9C%9F2/" rel="prev" title="状态反馈思考与仿真2——平衡点与随动系统">
      <i class="fa fa-chevron-left"></i> 状态反馈思考与仿真2——平衡点与随动系统
    </a></div>
      <div class="post-nav-item">
    <a href="/2021/10/25/%E5%BC%BA%E5%8C%96%E5%AD%A6%E4%B9%A0/3-%E6%9C%89%E9%99%90%E9%A9%AC%E5%B0%94%E5%8F%AF%E5%A4%AB%E5%86%B3%E7%AD%96%E8%BF%87%E7%A8%8B/" rel="next" title="3-有限马尔可夫决策过程">
      3-有限马尔可夫决策过程 <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#%E5%9F%BA%E6%9C%AC%E6%A6%82%E5%BF%B5"><span class="nav-number">1.</span> <span class="nav-text">基本概念</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E5%8A%A8%E4%BD%9C-%E4%BB%B7%E5%80%BC%E6%96%B9%E6%B3%95-action-valuemethods"><span class="nav-number">2.</span> <span class="nav-text">动作-价值方法 \(Action-value~Methods\)</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AF%B9%E6%9F%90%E5%8A%A8%E4%BD%9C%E5%AF%B9%E5%BA%94%E4%BB%B7%E5%80%BC%E7%9A%84%E4%BC%B0%E7%AE%97"><span class="nav-number">2.1.</span> <span class="nav-text">对某动作对应价值的估算</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E6%A0%B9%E6%8D%AE%E4%BC%B0%E8%AE%A1%E5%80%BC%E9%80%89%E6%8B%A9%E5%8A%A8%E4%BD%9C"><span class="nav-number">2.2.</span> <span class="nav-text">根据估计值选择动作</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E5%A2%9E%E9%87%8F%E8%AE%A1%E7%AE%97"><span class="nav-number">3.</span> <span class="nav-text">增量计算</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E9%9D%9E%E5%B9%B3%E7%A8%B3%E9%97%AE%E9%A2%98"><span class="nav-number">4.</span> <span class="nav-text">非平稳问题</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E6%A2%AF%E5%BA%A6%E8%B5%8C%E5%8D%9A%E6%9C%BA%E7%AE%97%E6%B3%95"><span class="nav-number">5.</span> <span class="nav-text">梯度赌博机算法</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%81%8F%E5%A5%BD%E5%87%BD%E6%95%B0"><span class="nav-number">5.1.</span> <span class="nav-text">偏好函数</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E6%9B%B4%E6%96%B0%E7%AD%96%E7%95%A5"><span class="nav-number">5.2.</span> <span class="nav-text">更新策略</span></a></li></ol></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="谢祖浩"
      src="/images/head.jpeg">
  <p class="site-author-name" itemprop="name">谢祖浩</p>
  <div class="site-description" itemprop="description">驽马十驾，功在不舍</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">9</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/categories/">
          
        <span class="site-state-item-count">2</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/tags/">
          
        <span class="site-state-item-count">13</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2022</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">谢祖浩</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://pisces.theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Pisces</a> 强力驱动
  </div>

        








      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>

<script src="/js/utils.js"></script>

<script src="/js/motion.js"></script>


<script src="/js/schemes/pisces.js"></script>


<script src="/js/next-boot.js"></script>




  















  

  
      

<script>
  if (typeof MathJax === 'undefined') {
    window.MathJax = {
      loader: {
        source: {
          '[tex]/amsCd': '[tex]/amscd',
          '[tex]/AMScd': '[tex]/amscd'
        }
      },
      tex: {
        inlineMath: {'[+]': [['$', '$']]},
        tags: 'ams'
      },
      options: {
        renderActions: {
          findScript: [10, doc => {
            document.querySelectorAll('script[type^="math/tex"]').forEach(node => {
              const display = !!node.type.match(/; *mode=display/);
              const math = new doc.options.MathItem(node.textContent, doc.inputJax[0], display);
              const text = document.createTextNode('');
              node.parentNode.replaceChild(text, node);
              math.start = {node: text, delim: '', n: 0};
              math.end = {node: text, delim: '', n: 0};
              doc.math.push(math);
            });
          }, '', false],
          insertedScript: [200, () => {
            document.querySelectorAll('mjx-container').forEach(node => {
              let target = node.parentNode;
              if (target.nodeName.toLowerCase() === 'li') {
                target.parentNode.classList.add('has-jax');
              }
            });
          }, '', false]
        }
      }
    };
    (function () {
      var script = document.createElement('script');
      script.src = '//cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js';
      script.defer = true;
      document.head.appendChild(script);
    })();
  } else {
    MathJax.startup.document.state(0);
    MathJax.texReset();
    MathJax.typeset();
  }
</script>

    

  

</body>
</html>
